<script setup>
import GoBack from "@/components/GoBackAndSearchNav.vue";
import {useRouter} from "vue-router";
import {HOME_ROUTE} from "@/router/routes/home/home.js";

const router = useRouter()

/**
 * 回到主页
 */
const goHome = () => {
  router.replace({name: HOME_ROUTE})
}
</script>

<template>
  <div class="error w-screen h-screen flex-column-center">
    <GoBack :title="'出错了'"></GoBack>
    <div class="title mb-8 text-4xl">呀!出错了!不开心!</div>
    <div>
      <van-button @click="goHome" color="linear-gradient(to right, #fe7136, #5eae7e)">
        回到主页
      </van-button>
    </div>
    <div class="mt-8">
      <img src="@/assets/imgs/error.svg" alt="错误图片">
    </div>
  </div>
</template>

<style scoped lang="scss">
.title {
  -webkit-text-stroke: 1px #f3f4f6;
}
</style>